package com.cy;

import cn.tedu_03.Person;

//饿汉式 单例模式设计
public class Test17 {
    public static void main(String[] args) {

        Person3 p = Person3.get();
        Person3 pp = Person3.get();
        System.out.println(p==pp);

    }
}

class Person3{
    private Person3(){}

    static private Person3 p= new Person3();

    static public Person3 get(){
        return p;
    }

}